<script setup lang="ts">
import { RouterLink, RouterView } from "vue-router";
import { useRoute } from "vue-router";
const route = useRoute();
</script>

<template>
  <div class="container">
    <div class="box">
      <RouterView />
    </div>
    <div class="footer" v-if="!route.meta.hidden">
      <RouterLink to="/">
        <van-icon name="wap-home-o" />
        <p>首页</p>
      </RouterLink>
      <RouterLink to="/famous">
        <van-icon name="manager-o" />
        <p>名医</p>
      </RouterLink>
      <RouterLink to="/say">
        <van-icon name="orders-o" />
        <p>医说</p>
      </RouterLink>
      <RouterLink to="/my">
        <van-icon name="contact" />
        <p>我的</p>
      </RouterLink>
    </div>
  </div>
</template>

<style lang="scss">
html,
body,
#app,
.container {
  width: 100%;
  height: 100%;
  background-color: #f7fdff;
}

html {
  font-size: 26.66666666666666vw;

  body {
    font-size: 14px;
  }
}

.container {
  display: flex;
  flex-direction: column;

  .box {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
  }

  .footer {
    height: 0.5rem;
    display: flex;
    justify-content: space-around;
    border-top: 0.01rem solid #ccc;
  }
  .footer a {
    flex: 1;
    text-decoration: none;
    display: flex;
    justify-content: space-around;
    flex-direction: column;
    align-items: center;
    p {
      margin: 0;
    }
  }
  .footer a:hover {
    color: orange;
  }
  ::-webkit-scrollbar {
    display: none;
  }
}
</style>
